<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/11/22
  Time: 17:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员控制面板</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/index.css"/>
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <style>
        .main{
            color:white;
        }
    </style>
</head>
<%String path = request.getContextPath();%>
<body>
<div class="main row clearfix">
    <div class="col-sm-2 text-center" style="background-color: darkgray;height: 95%;">
        <h3>欢迎，管理员：${currentUser.admin_name}</h3>
        <img src="${pageContext.request.contextPath}/images/logo.jpg"
        style="width: auto;height: auto;background-color: #FFFFFF"
             class="img-responsive center-block">
        <a type="button" name="btn" class="btn" value="个人信息"
                style="width: 100%;right: 0;margin-top: 5px;
                background-color: #FFA0A0;font-size: 16px;color: #FFFFFF"
                target="myif" href="${pageContext.request.contextPath}/jsp/admin_info.jsp">
            <span class="glyphicon glyphicon-user"></span>
            <span>个人信息</span>
        </a>
        <div class="panel-group" id="accordion" style="margin-top: 5px;">
            <div class="panel panel-warning" style="align-content: center;">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion"
                           href="#collapseFour" style="transform: translate(10%,0);">
                            <span class="glyphicon glyphicon-list-alt"></span>
                            <span>量表管理</span>
                        </a>
                    </h4>
                </div>
                <div id="collapseFour" class="panel-collapse collapse">
                    <div class="panel-body">
                        <a type="button" class="btn btn-warning"
                           style="width: 100%;right: 0;color:white;"
                           target="myif" href="${pageContext.request.contextPath}/jsp/upload.jsp">导入量表</a>
                        <a type="button" class="btn btn-warning"
                           style="width: 100%;right: 0;color:white;margin-top: 5px;"
                           target="myif" href="#">已发布的量表</a>
                    </div>
                </div>
            </div>
            <div class="panel panel-success">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion"
                           href="#collapseOne">
                            <span class="glyphicon glyphicon-send"></span>
                            <span>心理推文</span>
                        </a>
                    </h4>
                </div>
                <div id="collapseOne" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <a type="button" class="btn btn-success"
                           style="width: 100%;right: 0;color:white;"
                           target="myif" href="${pageContext.request.contextPath}/jsp/uploadessay.jsp">发布推文</a>
                        <a type="button" class="btn btn-success"
                           style="width: 100%;right: 0;color:white;margin-top: 5px;"
                           target="myif" href="<%=path%>/findAllEssays">历史推文</a>
                    </div>
                </div>
            </div>
            <!--div class="panel panel-success">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion"
                           href="#collapseTwo">
                            <span class="glyphicon glyphicon-comment"></span>
                            <span>评论管理</span>
                        </a>
                    </h4>
                </div>
                <div id="collapseTwo" class="panel-collapse collapse">
                    <div class="panel-body">
                        <input type="button" class="btn btn-success" value="已发布评论"
                               style="width: 100%;right: 0;">
                        <input type="button" class="btn btn-success" value="待审核评论"
                               style="width: 100%;right: 0;margin-top: 5px;">
                    </div>
                </div>
            </div-->
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion"
                           href="#collapseThree">
                            <span class="glyphicon glyphicon-sunglasses"></span>
                            <span>用户管理</span>
                        </a>
                    </h4>
                </div>
                <div id="collapseThree" class="panel-collapse collapse">
                    <div class="panel-body">
                        <a type="button" class="btn btn-info" class="btn"
                           style="width: 100%;right: 0;margin-top: 5px;"
                           target="myif" href="<%=path%>/AllInfo">
                            <span class="glyphicon glyphicon-check"></span>
                            <span>查看状态</span>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!--button type="submit" name="btn" class="btn" value="数据"
                style="width: 100%;right: 0;background-color: plum;
                transform: translate(0,-42%);font-size: 16px;">
            <span class="glyphicon glyphicon-equalizer"></span>
            <span>数据</span>
        </button-->
        <a type="button" name="btn" class="btn" value="数据"
           style="width: 100%;right: 0;background-color: plum;
                transform: translate(0,-37%);font-size: 16px;color:white;"
           target="myif" href="<%=path%>/jsp/systemdata.jsp">
            <span class="glyphicon glyphicon-equalizer"></span>
            <span>数据</span>
        </a>
        <!--button type="submit" name="btn" class="btn" value="数据" onclick="backTitle()"
                style="width: 100%;right: 0;background-color: lightskyblue;
                transform: translate(0,-42%);font-size: 16px;margin-top: 5px;color:white;height: 37px;">
            <span class="glyphicon glyphicon-equalizer"><a href="<%=path%>/index">返回首页</a></span>
        </button-->
        <a type="button" name="btn" class="btn" value="返回首页"
           style="width: 100%;right: 0;background-color:gainsboro;
                transform: translate(0,-22%);font-size: 16px;color:black;"
           href="<%=path%>/jsp/myIndex.jsp">
            <span class="glyphicon glyphicon-hand-left"></span>
            <span>返回首页</span>
        </a>
    </div>
    <div class="col-sm-8 text-center" style="background-color: darkred;height: 95%;">
        <h1 class="text-center">管理员操作区域</h1>
        <iframe name="myif" style="width: 95%;height: 82%;
        background-color: #FFFFFF;margin-top: 5px;"></iframe>
    </div>
    <div class="col-sm-2 text-center" style="background-color: darkorange;height: 95%;">
        <h1>Rest</h1>
        <div class="media">
            <div class="media-left">
                <h4 class="media-heading">暖心分享 <span class="badge">2</span></h4><br>
            </div>
            <div class="media-body">
                <img src="https://static.runoob.com/images/mix/img_avatar.png"
                     class="media-object" style="width:80px;margin-left: 50px;"><br>
                <p>人生总会有不期而遇的温暖和生生不息的希望。</p>
                <p>只有心里有阳光的人，才能感受到现实的阳光，如果连自己都常苦着脸，那生活如何美好？生活始终是一面镜子，照到的是我们的影像，当我们哭泣时，生活在哭泣，当我们微笑时，生活也在微笑。</p>
            </div>
        </div>
    </div>
    <div id="footer" style="margin-bottom: 0;">
        <div id="footerContent">
            <p>感谢支持解忧心理健康网站！欲了解更多详情/加入我们请点击<a href="#">这里</a>~</p>
        </div>
    </div>
</div>
<script type="text/javascript">
    /*$(function () { $('#collapseOne').collapse({
        toggle: false
    })});*/
    $(function () { $('#collapseOne').collapse('hide')});
    //$(function () { $('#collapseTwo').collapse('show')});
    $(function () { $('#collapseThree').collapse('hide')});
    $(function () { $('#collapseFour').collapse('hide')});
</script>
</body>
</html>
